<template>
	<div class="add_goods">
		<fEditGoods v-if="admin_id == 3 && type != 1"></fEditGoods>
		<bEditGoods v-if="admin_type == 2"></bEditGoods>
		<editGoods v-if="admin_type == 1 || is_subsidiary_corporation"></editGoods>
		<examineEditGoods v-if="admin_id == 3 && type == 1"></examineEditGoods>
	</div>
</template>

<script>
import fEditGoods from './components/edit_goods/f_edit_goods';
import bEditGoods from './components/edit_goods/b_edit_goods';
import editGoods from './components/edit_goods/edit_goods';
import examineEditGoods from './components/edit_goods/f_examine_edit_goods';
import sonMixin from '@/utils/sonMixin';
export default {
	mixins:[sonMixin],
	components: {
		fEditGoods,
		bEditGoods,
		editGoods,
		examineEditGoods
	},
	data() {
		return {
			type: '',
			key: localStorage.getItem('token'),
			user_F_id: localStorage.getItem('user_F_id'),
			admin_type: localStorage.getItem('admin_type'),
			admin_id: localStorage.getItem('admin_id') // admin_id 理员 1是总号，2是商家，3是厂家，4财务，5招商，6产品，7仓管 8收费厂家 9.外部招商员
		};
	},
	methods: {
		init() {
			this.type = this.$route.query.type;
		}
	},
	created() {
		this.init();
	}
};
</script>

<style>
.add_goods {
	width: 100%;
	height: 100%;
}
.add-goods-iframe {
	width: 100%;
	height: 100%;
	background-color: #fff;
}
</style>
